<style>
    .table_cls{
        font-size:12px;
    }
    .table_cls a{
     color:#0099FF;
     text-decoration: none;
    }
    .table_cls_td{
        width:100px;
    }
    .table_cls_first{
        width:300px;
    }
</style>
<?php
$total  = 0;
foreach ($rs as $k => $v):
    $total  = $total + $v->getCount();
endforeach;
?>
<table class="table_cls" width="100%">
    <tr>
        <td class="table_cls_first">来源</td>
        <td class="table_cls_td">总量</td>
        <td class="table_cls_td">比例</td>
    </tr>
<?php foreach ($rs as $k => $v):?>
<tr>
    <td class="table_cls_first" width="700px;">
            <?php if($v->getReferer() =='直接输入'):?>
                直接输入
            <?php else:?>
            
            <a href="<?php echo $v->getHost();?>" title="点击打开[<?php echo $v->getHost();?>]"><?php echo substr($v->getReferer(),0, 50);?></a>
            &nbsp;[<a href="<?php echo $v->getReferer();?>" title="点击查看[<?php echo $v->getReferer();?>]的最后来路URL">GO</a>]
            <?php endif;?>
        </td>
        <td class="table_cls_td" width="20%"><?php echo $v->getCount();?></td>
        <td  class="table_cls_td" width="20%"><?php echo round($v->getCount()*100/$total, 2);?>%</td>
</tr>
<?php endforeach;?>
</table>